#include "mainWindow.h"

//main---------------------------------
#define rungame
#ifdef rungame
int main(int argc, char* argsv[]){
    Gtk::Main kit = Gtk::Main(argc, argsv);
    game *stalemate = game::getGame();
    stalemate->set_visible(true);
    Gtk::Main::run(*stalemate);
}
#endif
//=====================================

//game---------------------------------
//constructor-----------
game* game::instance;

game* game::getGame(){
    if(instance == NULL){
        instance = new game();
    }
    return instance;
}
game::game(){
    set_title("Stalemate -- ");
    set_resizable(true);
    set_size_request(1000,500);
    do_intro();
}
game::~game(){
    clearMem();
}
//manips
void game::do_intro(){
    introWin* scr = new introWin();
    clearMem();
    remember(scr);
    scr->do_intro();
    scr->set_visible(true);
    add(*scr);
}
void game::do_game(){
    clearMem();
    mapdisplay::controll* ctrl = new mapdisplay::controll();
    int ctrlId = remember(ctrl);
    ctrl->set_visible(true);
    add(*ctrl);
}
//=====================================
